Triggers and SQL functions

Поиск
Список
Период
Сортировка
От Pierre Padovani
Тема Triggers and SQL functions
Дата
Msg-id l03130302b193b2e73867@[24.128.86.181]
обсуждение исходный текст
Список pgsql-sql
Can or will postgresql support trigger calls to sql defined functions?

When attempting this I get....

create function effect_of_add_prod(bpchar) returns boolean
 as
 'update developer
  set developer_tot_prod = developer_tot_prod + 1
  where exists (select developer_id
  from developer
  where developer_id = $1);
  select true as ignore_this;'
 language 'sql';
CREATE

 create trigger add_product after insert
 on product for each row
 execute procedure effect_of_add_prod(product_developer);
ERROR:  CreateTrigger: function effect_of_add_prod () does not exist

Searching through documentation reveals only mention of calls to C
functions...is there no way to call SQL functions?

-=pierre



В списке pgsql-sql по дате отправления:

Предыдущее
От: M Simms
Дата:
Сообщение: oops and a question
Следующее
От: Bernhard Matthias Ertl
Дата:
Сообщение: inheritance